﻿package net.wangit.adm.role;

import net.wangit.MapList;
import net.wangit.Unit;
import net.wangit.context.ActionContext;
import net.wangit.support.UnitInterceptor;
import net.wangit.util.Checker;

public class RoleUserUI implements UnitInterceptor {

	public RoleUserUI() {
	}

	public String intercept(ActionContext ac, Unit unit) throws Exception {
		MapList data = unit.getData();
		if (!Checker.isEmpty(data)) {
			for (int i = 0; i < data.size(); i++)
				if ("0".equals(data.getRow(i).get("hold")))
					unit.setRowCss(i, "repellent");

		}
		return unit.write(ac);
	}
}
